package com.shoukaiseki.test.spring.validator.model;

import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.*;

/**
 * <br>
 *
 * @author 蒋カイセキ    Japan-Tokyo  18-12-3 下午8:59<br>
 * ブログ http://www.shoukaiseki.top/<br>
 * E-メール jiang28555@Gmail.com<br>
 **/
public class User {

    @NotEmpty
    private String name;

    @NotNull
    @Min( 10)
    @Max(20)
    private Integer age;

    @NotBlank
    private String surname;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getSurname() {
        return surname;
    }

    public void setSurname(String surname) {
        this.surname = surname;
    }
}
